/**
 * Jaxson ajax
 *
 * Copyright Remedy Interactive, licensed under Apache version 2 license:
 *
 *  http://www.apache.org/licenses/LICENSE-2.0.html
 *
 * This notice must remain in all java source files.
 */
package org.jaxson.struts.charts;

import org.jfree.chart.JFreeChart;
import org.jfree.data.general.Dataset;

/**
 * Extension point for creating new types of charts
 * in Jaxson.  Links the Jaxson and JFreeChart APIs.
 * 
 * @author Joe Maisel
 *
 */
public abstract class AbstractChart
{
	protected JFreeChart jFreeChart;
	protected Dataset dataset;
	protected AbstractChartRenderer renderer;
	protected ChartFormat format = new ChartFormat();
	
	public abstract Class<? extends Dataset> datatype();
	
	/**
	 * @return the jFreeChart
	 */
	public JFreeChart getJFreeChart()
	{
		return jFreeChart;
	}
	/**
	 * @param freeChart the jFreeChart to set
	 */
	public void setJFreeChart( JFreeChart freeChart )
	{
		jFreeChart = freeChart;
	}
	/**
	 * @return the dataset
	 */
	public Dataset getDataset()
	{
		return dataset;
	}
	/**
	 * @param dataset the dataset to set
	 */
	public void setDataset( Dataset dataset )
	{
		this.dataset = dataset;
	}
	/**
	 * @return the format
	 */
	public ChartFormat getFormat()
	{
		return format;
	}
	/**
	 * @param format the format to set
	 */
	public void setFormat( ChartFormat format )
	{
		this.format = format;
	}
	
	/**
	 * @return the renderer
	 */
	public AbstractChartRenderer getRenderer()
	{
		return renderer;
	}

	/**
	 * @param renderer the renderer to set
	 */
	public void setRenderer( AbstractChartRenderer renderer )
	{
		this.renderer = renderer;
	}
}
